package com.parfinex.java.phase1.module2.task08;

public class Worker extends Person {
    private int salary;
    public Worker(){}
    public Worker(String name, int age, int salary){
        setName(name);
        setAge(age);
        setSalary(salary);
    }
    public int getSalary(){
        return salary;
    }
    public void setSalary(int salary){
        this.salary = salary;
    }
    //自定义成员方法描述工作的行为
    public void work(){
        System.out.println("今天的砖头有点烫手...");
    }


}
